package com.rankeiot.ai.domain;

import java.io.Serializable;
import java.util.Date;
import java.sql.Types;

import lombok.Data;
import lombok.experimental.FieldNameConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;
import org.sagacity.sqltoy.config.annotation.Column;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;


/**
* AI功能调用
*/
@Schema(description="AI功能调用")
@Data
@FieldNameConstants(asEnum = true)
@Entity(tableName= FunctionEntity.TABLE)
public class FunctionEntity implements Serializable{
    public static final String TABLE="ai_function";

    /**
    * ID
    */
    @Schema(description="ID")
    @Id(strategy = "identity")
    @Column(name="id",length=19L,type=Types.BIGINT,nullable=false)
    private Long id;
    /**
    * 名称
    */
    @Schema(description="名称")
    @NotNull
    @Length(max=50)
    @Column(name="name",length=50L,type=Types.VARCHAR,nullable=false)
    private String name;
    /**
    * 功能描述
    */
    @Schema(description="功能描述")
    @NotNull
    @Length(max=255)
    @Column(name="description",length=255L,type=Types.VARCHAR,nullable=false)
    private String description;
    /**
    * 参数描述
    */
    @Schema(description="参数描述")
    @Length(max=1000)
    @Column(name="parameters",length=1000L,type=Types.VARCHAR)
    private String parameters;
    /**
    * 返回示例
    */
    @Schema(description="返回示例")
    @Length(max=1000)
    @Column(name="responses",length=1000L,type=Types.VARCHAR)
    private String responses;
    /**
    * 举例
    */
    @Schema(description="举例")
    @Length(max=1000)
    @Column(name="examples",length=1000L,type=Types.VARCHAR)
    private String examples;
    /**
    * 所属应用
    */
    @Schema(description="所属应用")
    @Length(max=30)
    @Column(name="app_id",length=30L,type=Types.VARCHAR)
    private String appId;
    /**
    * 描述向量
    */
    @Schema(description="描述向量")
    @Length(max=255)
    @Column(name="vector",length=255L,type=Types.VARCHAR)
    private String vector;
    /**
    * 是否直接返回结果
    */
    @Schema(description="是否直接返回结果")
    @Column(name="direct",length=1L,type=Types.VARCHAR)
    private Boolean direct;
    /**
    * 处理脚本
    */
    @Schema(description="处理脚本")
    @Length(max=255)
    @Column(name="script",length=255L,type=Types.VARCHAR)
    private String script;
    /**
    * 前置脚本
    */
    @Schema(description="前置脚本")
    @Length(max=255)
    @Column(name="per_script",length=255L,type=Types.VARCHAR)
    private String perScript;
    /**
    * 创建人
    */
    @Schema(description="创建人")
    @Length(max=100)
    @Column(name="create_user",length=100L,type=Types.VARCHAR)
    private String createUser;
    /**
    * 创建时间
    */
    @Schema(description="创建时间")
    @Column(name="create_time",length=19L,type=Types.TIMESTAMP)
    private Date createTime;
    /**
    * 更新人
    */
    @Schema(description="更新人")
    @Length(max=100)
    @Column(name="update_user",length=100L,type=Types.VARCHAR)
    private String updateUser;
    /**
    * 更新时间
    */
    @Schema(description="更新时间")
    @Column(name="update_time",length=19L,type=Types.TIMESTAMP)
    private Date updateTime;

    public FunctionEntity(){}
    public FunctionEntity(Long id){
            this.id=id;
        }
}
